#ifndef __RANDOM_HPP__
#define __RANDOM_HPP__

#include <cstdlib>
#include <ctime>
#define N 999
class Random {
public:
    static void init(){
        srand( (unsigned int) time(nullptr) );
    }
    //0,5
    //0-4
    static int range( int min, int max ) {
        if ( min == max ) {
            return min;
        }
        int dt = max - min;
        return min + rand() % dt;
    }

    static float random( ) {
        return rand() % ( N + 1 ) / (float)( N + 1 );
    }
};


#endif // !__RANDOM_HPP__
